emacs.git
10 years agoRemove debugging
Lars Ingebrigtsen [Tue, 16 Feb 2016 02:24:47 +0000 (13:24 +1100)]
Remove debugging

10 years agoEnsure we always free DNS resources when deleting a process
Lars Ingebrigtsen [Tue, 16 Feb 2016 02:23:15 +0000 (13:23 +1100)]
Ensure we always free DNS resources when deleting a process

* src/process.c (free_dns_request): Factor out into own function.
(Fdelete_process): When deleting a process, free any DNS
structures associated with it.
(check_for_dns): Always free all DNS resources.

10 years agoDon't block in set-process-window-size
Alain Schneble [Tue, 16 Feb 2016 02:13:06 +0000 (13:13 +1100)]
Don't block in set-process-window-size

* src/process.c (set-process-window-size): Explicitly return Qnil when
called with network processes as set_window_size won't work anyway on
socket fds.  As a welcome side effect, this makes the blocking
wait_for_socket_fds call obsolete.

10 years agoDo most of the coding system setup earlier
Lars Ingebrigtsen [Tue, 16 Feb 2016 02:01:05 +0000 (13:01 +1100)]
Do most of the coding system setup earlier

* src/process.c (Fmake_network_process): Set the read/write
coding systems here, so that special bindings work.
(Fmake_network_process): Complete the coding system setup here.

10 years agoProtect against initial handshake failures
Lars Ingebrigtsen [Mon, 15 Feb 2016 09:10:10 +0000 (20:10 +1100)]
Protect against initial handshake failures

* src/process.c (connect_network_socket): Mark the connection
as failed if the handshake didn't succeed yet.  This should be
reworked later.

10 years agoCall the network security manager after doing TLS negotiation
Lars Ingebrigtsen [Mon, 15 Feb 2016 07:24:08 +0000 (18:24 +1100)]
Call the network security manager after doing TLS negotiation

* lisp/net/network-stream.el (network-stream-open-tls):
Postpone NSM verification when running async.

* src/process.c (Fset_process_filter): This function doesn't
need to wait.
(connect_network_socket): Set the process status to "run" only
after TLS negotiation.
(wait_for_socket_fds): Take a name parameter for more debugging.
(wait_reading_process_output): Don't change status to "run"
unless TLS negotiation has finished.
(send_process): Wait for the process here instead of
send_process_string.
(connect_network_socket): Call the network security manager.

10 years agoRemove some #ifdefs and update documentation
Lars Ingebrigtsen [Mon, 15 Feb 2016 05:05:14 +0000 (16:05 +1100)]
Remove some #ifdefs and update documentation

* doc/lispref/processes.texi (Network Processes): Remove
mention of `dns'.

* lisp/net/network-stream.el (open-network-stream): Remove
mention of `dns'.

* src/process.c (Fset_process_filter)
(Fset_process_window_size, Fprocess_contact)
(Fprocess_datagram_address, Fset_process_datagram_address)
(Fset_network_process_option, Fprocess_send_region)
(Fprocess_send_string, Fset_process_coding_system)
(Fset_process_filter_multibyte): Remove the #ifdef
HAVE_GETADDRINFO_A checks.
(Fprocess_send_string): Wait for TLS negotiation.
(wait_for_tls_negotiation): New function.
(send_process): Remove the TLS boot check.

* src/process.c (Fmake_network_process): Ditto.

10 years agoUse :nowait t in url-gw
Lars Ingebrigtsen [Mon, 15 Feb 2016 04:59:49 +0000 (15:59 +1100)]
Use :nowait t in url-gw

* lisp/url/url-gw.el (url-open-stream): Just use :nowait t,
since we're not differentiating.

10 years agoAdd blockers to process functions
Alain Schneble [Mon, 15 Feb 2016 04:44:29 +0000 (15:44 +1100)]
Add blockers to process functions

* src/process.c (set-process-filter, set-process-window-size,
process-contact, process-datagram-address, set-process-datagram-address,
set-network-process-option): Make functions wait (block) on network
process until pending DNS requests have been processed and associated
socket initialized.

* src/process.c (process-send-region, process-send-string,
process-send-eof): Make functions wait (block) while network process is
in connect state.

10 years agosrc/process.c Correctly convert AF_INET6 addresses
David Edmondson [Sun, 7 Feb 2016 01:54:08 +0000 (12:54 +1100)]
src/process.c Correctly convert AF_INET6 addresses

* src/process.c (conv_lisp_to_sockaddr): AF_INET6 addresses are
converted to a list of 16 bit quantities by
conv_sockaddr_to_lisp(). conv_lisp_to_sockaddr() should follow the
same scheme rather than expecting a (longer) list of 8 bit
quantities.

10 years agoAdd an IPv6 test
Lars Ingebrigtsen [Mon, 8 Feb 2016 23:24:34 +0000 (10:24 +1100)]
Add an IPv6 test

* test/lisp/net/network-stream-tests.el
(connect-to-tls-ipv6-nowait): Add an ipv6 test, too.

10 years agoUse gnutls-serv instead of openssh
Lars Ingebrigtsen [Mon, 8 Feb 2016 23:16:14 +0000 (10:16 +1100)]
Use gnutls-serv instead of openssh

* test/lisp/net/network-stream-tests.el (make-tls-server): Use
gnutls-serv instead of openssh.

10 years agoSkip TLS tests if we don't have openssl
Lars Ingebrigtsen [Mon, 8 Feb 2016 07:28:00 +0000 (18:28 +1100)]
Skip TLS tests if we don't have openssl

* test/lisp/net/network-stream-tests.el (connect-to-tls): Skip
TLS tests if we don't have openssl and GnuTLS.

10 years agoAdd a TLS connection test
Lars Ingebrigtsen [Mon, 8 Feb 2016 04:28:50 +0000 (15:28 +1100)]
Add a TLS connection test

* test/lisp/net/network-stream-tests.el (connect-to-tls): Add
a TLS connection test.

10 years agoAdd more network tests
Lars Ingebrigtsen [Mon, 8 Feb 2016 03:35:07 +0000 (14:35 +1100)]
Add more network tests

* test/lisp/net/network-stream-tests.el (echo-server-nowait):
New test.

10 years agoAdd network tests
Lars Ingebrigtsen [Mon, 8 Feb 2016 03:24:25 +0000 (14:24 +1100)]
Add network tests

* test/lisp/net/network-stream-tests.el: New suite of network tests.

10 years agoMake url.el use async DNS
Lars Ingebrigtsen [Fri, 5 Feb 2016 03:03:26 +0000 (14:03 +1100)]
Make url.el use async DNS

* lisp/url/url-gw.el (url-open-stream): Use non-blocking DNS.

* src/process.c (syms_of_process): Add a `dns' subfeature for
make-network-process.

10 years agoOnly do async DNS if requested with :nowait 'dns
Lars Ingebrigtsen [Fri, 5 Feb 2016 02:57:28 +0000 (13:57 +1100)]
Only do async DNS if requested with :nowait 'dns

* doc/lispref/processes.texi (Network Processes): Mention the
dns value of :nowait.

* src/process.c (Fmake_network_process): Only do async DNS if
:nowait is `dns'.

10 years agoAdd sanity check for checking async DNS
Lars Ingebrigtsen [Fri, 5 Feb 2016 02:04:59 +0000 (13:04 +1100)]
Add sanity check for checking async DNS

* src/process.c (check_for_dns): Disregard processes that have
already been killed.

10 years agoDoc fixes and refactorings based on comments from Eli Zaretskii
Lars Ingebrigtsen [Wed, 3 Feb 2016 01:43:24 +0000 (12:43 +1100)]
Doc fixes and refactorings based on comments from Eli Zaretskii

* doc/lispref/processes.texi (Network Processes): Clarify the
meaning of :tls-parameters.

* lisp/net/gnutls.el (open-gnutls-stream): Clarify :nowait.

* lisp/net/gnutls.el (gnutls-boot-parameters): Factor out into
own function.
(gnutls-negotiate): Use it.
(open-gnutls-stream): Ditto.

* src/eval.c (vformat_string): Refactor out the printing bits
from verror.
(verror): Use it.

* src/gnutls.c (boot_error): Mark failed processes with the
real error message.

* src/lisp.h: Declare vformat_string.

10 years agoBuild fix for --enable-check-lisp-object-type
Lars Ingebrigtsen [Tue, 2 Feb 2016 02:17:53 +0000 (03:17 +0100)]
Build fix for --enable-check-lisp-object-type

* process.c (check_for_dns): Type fix reported by YAMAMOTO
Mitsuharu.

10 years agoBoot parameter check fix
Lars Ingebrigtsen [Tue, 2 Feb 2016 01:52:03 +0000 (02:52 +0100)]
Boot parameter check fix

* process.c (send_process): Fix test for boot parameters noted
by Andy Moreton.

10 years agoStyle fix
Lars Ingebrigtsen [Mon, 1 Feb 2016 05:05:53 +0000 (06:05 +0100)]
Style fix

10 years agoReturn the correct server port number
Lars Ingebrigtsen [Mon, 1 Feb 2016 04:43:17 +0000 (05:43 +0100)]
Return the correct server port number

* process.c (connect_network_socket): Return the correct
server port number.

10 years agoFix autoconf test for getaddrinfo_a
Lars Ingebrigtsen [Mon, 1 Feb 2016 03:53:27 +0000 (04:53 +0100)]
Fix autoconf test for getaddrinfo_a

* configure.ac: Make the test for getaddrinfo_a work.

10 years agoBetter async error reporting
Lars Ingebrigtsen [Mon, 1 Feb 2016 02:58:03 +0000 (03:58 +0100)]
Better async error reporting

* process.c (connect_network_socket): Mark failed processes
with a better error message.
(check_for_dns): Ditto.

10 years agoClarify :tls-parameters.
Lars Ingebrigtsen [Mon, 1 Feb 2016 02:37:31 +0000 (03:37 +0100)]
Clarify :tls-parameters.

10 years agoAlways boot TLS if given parameters
Lars Ingebrigtsen [Mon, 1 Feb 2016 02:26:09 +0000 (03:26 +0100)]
Always boot TLS if given parameters

* src/process.c (connect_network_socket): If we have the TLS
parameters, then boot the socket.

10 years agoAdd documentation for :tls-parameters
Lars Ingebrigtsen [Mon, 1 Feb 2016 02:15:36 +0000 (03:15 +0100)]
Add documentation for :tls-parameters

* doc/lispref/processes.texi (Network Processes): Mention
:tls-parameters.

* src/process.c (Fmake_network_process): Document the
:tls-parameters parameter.

10 years agoBuild fix for glibc systems.
Lars Ingebrigtsen [Mon, 1 Feb 2016 02:06:58 +0000 (03:06 +0100)]
Build fix for glibc systems.

10 years agoMake network connections work again on non-glibc systems
Lars Ingebrigtsen [Mon, 1 Feb 2016 01:57:04 +0000 (02:57 +0100)]
Make network connections work again on non-glibc systems

* lisp/net/gnutls.el (open-gnutls-stream): Pass the TLS
keywords in directly so that they can be used when doing
synchronous DNS on non-synchronous connections.

* lisp/net/network-stream.el (open-network-stream): Allow
passing in the TLS parameters directly.

* src/process.c (conv_numerical_to_lisp): New function to convert
numerical addresses to Lisp.
(Fmake_network_process): Rework the non-HAVE_ADDRINFO code
paths so that they work again.
(syms_of_process): Build fix for non-glibc systems.

10 years agoWindows build fix
Lars Ingebrigtsen [Mon, 1 Feb 2016 00:19:42 +0000 (01:19 +0100)]
Windows build fix

* process.c (Fmake_network_process): Build fix for systems
without local sockets.

10 years agoUse XCAR/XCDR instead of Fcar etc
Lars Ingebrigtsen [Mon, 1 Feb 2016 00:15:43 +0000 (01:15 +0100)]
Use XCAR/XCDR instead of Fcar etc

10 years agoFix GC problem in async TLS connection
Lars Ingebrigtsen [Mon, 1 Feb 2016 00:10:57 +0000 (01:10 +0100)]
Fix GC problem in async TLS connection

* process.h: All Lisp_Object slots have to come first,
otherwise they won't be protected from gc.

10 years agoFurther TLS async work
Lars Ingebrigtsen [Sun, 31 Jan 2016 23:27:07 +0000 (00:27 +0100)]
Further TLS async work

* gnutls.c (boot_error): New function to either signal an
error or return an error code.
(Fgnutls_boot): Don't signal errors when running asynchronously.

* process.h (pset_status): Move here from process.c to be
able to use from gnutls.c.

* process.c (connect_network_socket): Do the TLS boot here
when running asynchronously.
(wait_reading_process_output): Rework the dns_processes
handling for more safety.

10 years agoClean up dead code
Lars Ingebrigtsen [Sun, 31 Jan 2016 23:23:33 +0000 (00:23 +0100)]
Clean up dead code

* lisp/net/gnutls.el (gnutls-async-sentinel): Remove.

10 years agoRework the mechanisms for async GnuTLS connections
Lars Ingebrigtsen [Sun, 31 Jan 2016 01:32:21 +0000 (02:32 +0100)]
Rework the mechanisms for async GnuTLS connections

* lisp/net/gnutls.el (open-gnutls-stream): Compute the
gnutls-boot parameters and pass them to the process object.
(gnutls-negotiate): New parameter :return-keywords that won't
connect to anything, just compute the keywords.

* lisp/url/url-http.el (url-http): Revert async TLS sentinel
hack, which is no longer necessary.

* src/gnutls.c (Fgnutls_asynchronous_parameters): Rename from
gnutls-mark-process.

* src/process.c (connect_network_socket): If we're connecting to
an asynchronous TLS socket, complete the GnuTLS boot sequence here.

* src/process.h: New parameter gnutls_async_parameters.

10 years agoFix segfault from double free
Lars Ingebrigtsen [Sun, 31 Jan 2016 01:00:12 +0000 (02:00 +0100)]
Fix segfault from double free

* process.c (check_for_dns): Protect against double free
issues.

10 years agoRemove debugging
Lars Ingebrigtsen [Sun, 31 Jan 2016 00:41:33 +0000 (01:41 +0100)]
Remove debugging

10 years agoImplement asynchronous GnuTLS connections
Lars Ingebrigtsen [Sun, 31 Jan 2016 00:34:45 +0000 (01:34 +0100)]
Implement asynchronous GnuTLS connections

* doc/misc/emacs-gnutls.texi (Help For Developers): Mention
the nowait parameter.

* lisp/net/gnutls.el (open-gnutls-stream): Allow asynchronous
connections with the new nowait parameter.

* lisp/net/network-stream.el (network-stream-open-tls): Pass
on :nowait to open-gnutls-stream.

* lisp/url/url-http.el (url-http): Don't overwrite the
sentinel created by open-gnutls-stream.

* src/gnutls.c (Fgnutls_mark_process): New function.

* src/process.c (send_process): Don't write to GnuTLS sockets that
haven't been initialised yed.

* src/process.h: New slot gnutls_wait_p.

10 years agoClean up compilation warnings
Lars Ingebrigtsen [Sat, 30 Jan 2016 08:09:02 +0000 (09:09 +0100)]
Clean up compilation warnings

10 years agoMake async resolution more efficient
Lars Ingebrigtsen [Sat, 30 Jan 2016 08:07:24 +0000 (09:07 +0100)]
Make async resolution more efficient

* process.c (wait_reading_process_output): Use a list of
process objects instead of looping through an array to check
for name resolution.  This should be much faster.

10 years agoMore async memory leaks
Lars Ingebrigtsen [Sat, 30 Jan 2016 04:31:21 +0000 (05:31 +0100)]
More async memory leaks

* src/process.c (check_for_dns): Free even more allocated async stuff.

10 years agoCompilation for for systems with getaddrinfo_a
Lars Ingebrigtsen [Sat, 30 Jan 2016 03:43:10 +0000 (04:43 +0100)]
Compilation for for systems with getaddrinfo_a

* process.c (Fmake_network_process): Make stuff work again on
systems with getaddrinfo_a.

10 years agoSave correct server data
Lars Ingebrigtsen [Sat, 30 Jan 2016 03:34:48 +0000 (04:34 +0100)]
Save correct server data

* process.c (connect_network_socket): Save the correct contact
info for servers.

10 years agoCompilation for for non-GNU systems
Lars Ingebrigtsen [Sat, 30 Jan 2016 02:57:54 +0000 (03:57 +0100)]
Compilation for for non-GNU systems

* process.c (Fmake_network_process): Make compilation work
again on hosts that don't have getaddrinfo_a.

10 years agoAvoid memory leaks in async DNS
Lars Ingebrigtsen [Sat, 30 Jan 2016 02:51:04 +0000 (03:51 +0100)]
Avoid memory leaks in async DNS

* process.c (check_for_dns): Free async DNS resources after
they've been used.

10 years ago* process.c (check_for_dns): Free the result data.
Lars Ingebrigtsen [Sat, 30 Jan 2016 01:39:52 +0000 (02:39 +0100)]
* process.c (check_for_dns): Free the result data.

10 years agoFix server connections
Lars Ingebrigtsen [Sat, 30 Jan 2016 01:25:08 +0000 (02:25 +0100)]
Fix server connections

* process.c (Fmake_network_process): Make creating server
listening ports work again.

10 years agoFurther make_network_process clean up
Lars Ingebrigtsen [Sat, 30 Jan 2016 00:33:30 +0000 (01:33 +0100)]
Further make_network_process clean up

* process.c (Fmake_network_process): Remove setting of unused
family variable.

10 years agoClean up GETADDRINFO usage in make-network-process
Lars Ingebrigtsen [Sat, 30 Jan 2016 00:28:34 +0000 (01:28 +0100)]
Clean up GETADDRINFO usage in make-network-process

* process.c (Fmake_network_process): Clean up the GETADDRINFO
handling.

10 years agoImplement asynchronous name resolution
Lars Ingebrigtsen [Fri, 29 Jan 2016 23:49:18 +0000 (00:49 +0100)]
Implement asynchronous name resolution

* process.c (Fmake_network_process): Do asynchronous DNS
lookups if we have getaddrinfo_a and the user requests :nowait.
(check_for_dns): New function.
(wait_reading_process_output): Check for pending name
resolution in the idle loop.

* process.h: Add structure for async DNS.

10 years agoFix memory leak
Lars Ingebrigtsen [Thu, 28 Jan 2016 23:36:11 +0000 (00:36 +0100)]
Fix memory leak

* process.c (connect_network_socket): Free previous sockaddr
before allocating a new one.

10 years agoReturn IP addresses in the correct order
Lars Ingebrigtsen [Thu, 28 Jan 2016 23:25:07 +0000 (00:25 +0100)]
Return IP addresses in the correct order

* src/process.c (Fmake_network_process): Return the IP addresses
in the same order as getaddrinfo does.
(set_network_socket_coding_system): Clean up the code slightly.

10 years agoAdd checks for getaddrinfo_a
Lars Ingebrigtsen [Thu, 28 Jan 2016 22:51:55 +0000 (23:51 +0100)]
Add checks for getaddrinfo_a

* configure.ac: Detect getaddrinfo_a.

10 years agoRefactor make_network_process
Lars Ingebrigtsen [Thu, 28 Jan 2016 22:50:47 +0000 (23:50 +0100)]
Refactor make_network_process

* src/process.c (set_network_socket_coding_system)
(connect_network_socket): Refactor out of
make_network_process to allow calling connect_network_socket
asynchronously.
(Fmake_network_process): Do nothing but parsing the parameters
and name resolution, leaving the connection to
connect_network_socket.

10 years ago; Auto-commit of ChangeLog files.
Glenn Morris [Sun, 24 Jan 2016 11:23:36 +0000 (06:23 -0500)]
; Auto-commit of ChangeLog files.

10 years agoImprove user name completion in Tramp
Michael Albinus [Sat, 23 Jan 2016 15:20:21 +0000 (16:20 +0100)]
Improve user name completion in Tramp

* lisp/net/tramp.el (tramp-parse-passwd, tramp-parse-etc-group):
Call also "getent passwd" or "getent group", if possible.
(tramp-parse-putty): Cache the result.

10 years ago* etc/NEWS: Move kqueue entries to Emacs 25.1 sections.
Michael Albinus [Fri, 22 Jan 2016 19:00:44 +0000 (20:00 +0100)]
* etc/NEWS: Move kqueue entries to Emacs 25.1 sections.

10 years agoRemove handling of non-string time-stamp formats, obsolete for 20 years.
Glenn Morris [Thu, 21 Jan 2016 01:11:16 +0000 (20:11 -0500)]
Remove handling of non-string time-stamp formats, obsolete for 20 years.

* lisp/time-stamp.el (time-stamp-format): Doc fix.
(time-stamp-old-format-warn, time-stamp-fconcat): Remove.
(time-stamp-string): Ignore non-string formats.

; * etc/NEWS: Mention this.

10 years agoAnoter fix for problematic merge from emacs-25
Eli Zaretskii [Wed, 20 Jan 2016 17:34:27 +0000 (19:34 +0200)]
Anoter fix for problematic merge from emacs-25

* src/w32fns.c (globals_of_w32fns): Move initialization of
resetstkoflw to a non-Cygwin part.

10 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Michael Albinus [Wed, 20 Jan 2016 10:03:36 +0000 (11:03 +0100)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

10 years ago* test/Makefile.in (mostlyclean): Use ${LOGFILES}.
Michael Albinus [Wed, 20 Jan 2016 10:03:15 +0000 (11:03 +0100)]
* test/Makefile.in (mostlyclean): Use ${LOGFILES}.

10 years agoFix MS-Windows build broken by a botched merge from emacs-25
Eli Zaretskii [Wed, 20 Jan 2016 09:47:19 +0000 (11:47 +0200)]
Fix MS-Windows build broken by a botched merge from emacs-25

* src/w32.c (w32_crypto_hprov): New static variable.
(globals_of_w32): Initialize w32_crypto_hprov.
(w32_init_crypt_random, w32_init_random): New functions.
Include wincrypt.h.
* src/w32.h (w32_init_random): Add prototype.

10 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Vincent Belaïche [Wed, 20 Jan 2016 07:30:51 +0000 (08:30 +0100)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

10 years agoCorrect a whole bunch of bugs coming with renamed cell relocation.
Vincent Belaïche [Wed, 20 Jan 2016 07:28:06 +0000 (08:28 +0100)]
Correct a whole bunch of bugs coming with renamed cell relocation.

* lisp/ses.el (ses-localvars): rename variable
`ses--renamed-cell-symb-list' into `ses--in-killing-named-cell-list'
and adjust the comment about it.
(ses-plist-delq): new defun.
(ses--ses-buffer-list): new defvar.
(ses--unbind-cell-name): new defun.
(ses-relocate-symbol): Do not relocate symbol when it is a named cell.
(ses-relocate-formula): Undo change of
2011-12-27T19:30:39Z!vincentb1@users.sourceforge.net that was
preventing relocation for named cell --- now doing this is delegated
to function `ses-relocate-symbol'.
(ses-relocate-range): In docstring, undo change of
2016-01-03T07:31:52Z!johnw@newartisans.com, `ses-range' must remain
lower case as it is not a variable.
(ses-relocate-all): Cell name relocation : 1) check that cell is a
renamed cell by testing `ses-cell' property to :ses-named, rather than
comparing name to corresponding standard name. Set rowcol of renamed
cell into the hashmap --- `ses-cell' property must not be used for
that as the same name can be used for different locations in different
SES sheets ; 2) use `local-variable-if-set-p' rather than `boundp' and
`local-variable-p' to check if cell name is already in use in this
sheet or needs initialisation.
(ses-relocate-all): Cell value relocation : 1) like for name
relocation use the `ses-cell' property rather than comparing actual
name to corresponding standard name. 2) Correct bug introduced in
2011-12-27T19:30:39Z!vincentb1@users.sourceforge.net, as the test was
made the other way round than the intention --- ie value relocation
was disabled for standard cell, not for renamed cell as was the
intention.
(ses-relocate-all): Add loop for unbinding deleted renamed cells
names.
(ses-killbuffer-hook): new defun.
(ses-mode): Add the ses--ses-buffer-list maintenance mechanism ---
kill buffer hook, plus pushing current buffer if new in list.
(ses-delete-row, ses-delete-column): Collect deleted renamed cells
into `ses--in-killing-named-cell-list'.
(ses-rename-cell): Remove update of variable
`ses--renamed-cell-symb-list', this variable is renamed to
`ses--in-killing-named-cell-list', and its setting is done in
functions `ses-delete-row' and , `ses-delete-column' now.
(ses-rename-cell): Change correction of
2015-12-30T23:10:37Z!vincentb1@users.sourceforge.net concerning
computation of the range over which `cursor-intangible' property was
to be updated. This correction was ok for non spilling cells, but not
for cells spilling over following blank cells. Simply use
`next-single-property-change' rather than computing the end column
from column widths.

10 years ago-
John Wiegley [Tue, 19 Jan 2016 06:59:51 +0000 (22:59 -0800)]
-

10 years ago; Merge from origin/emacs-25
John Wiegley [Tue, 19 Jan 2016 06:56:34 +0000 (22:56 -0800)]
; Merge from origin/emacs-25

The following commit was skipped:

6e79b63 ; Auto-commit of loaddefs files.

10 years agoMerge from origin/emacs-25
John Wiegley [Tue, 19 Jan 2016 06:56:34 +0000 (22:56 -0800)]
Merge from origin/emacs-25

3ae7934 ; * etc/NEWS: Mark entries that don't need further treatment.
6165c36 * lisp/files.el (dir-locals--all-files): Respect absolute file-names
2ffdf15 * lisp/help-fns.el (describe-variable): Fix a left-over parenthesis
71ecd62 * lisp/dired-x.el (dired-omit-here-always): Use add-dir-local-variable
f0b82b3 * lisp/files.el (dir-locals--all-files): Use completion instead of wildcards
86e4513 Fix incompatbilities with MS-Windows 2000 and older
4e96521 Mention in PROBLEMS an issue with MS-Windows NT4
15c23aa Ensure 8-byte aligned memory allocation on MS-Windows 9X
39afa42 Fix tests for active region in hideif.el
05df666 Fix interactive specs in some hideif.el commands

10 years ago; Merge from origin/emacs-25
John Wiegley [Tue, 19 Jan 2016 06:56:33 +0000 (22:56 -0800)]
; Merge from origin/emacs-25

The following commit was skipped:

bb0cd31 Merge branch 'emacs-25' of git.sv.gnu.org:/srv/git/emacs into emacs-25

10 years ago-
John Wiegley [Tue, 19 Jan 2016 06:56:33 +0000 (22:56 -0800)]
-

10 years agoAvoid stdio in SIGINT handler
Paul Eggert [Sun, 3 Jan 2016 23:00:49 +0000 (15:00 -0800)]
Avoid stdio in SIGINT handler

* admin/merge-gnulib (GNULIB_MODULES): Add ignore-value.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* lib/ignore-value.h: New file, from gnulib.
* src/keyboard.c: Include it.
(write_stdout, read_stdin): New functions.
(handle_interrupt): Use them instead of printf and getchar,
and avoid fflush when handling signals.

10 years agoRefactor mml-smime.el, mml1991.el, mml2015.el
Jens Lechtenboerger [Sun, 3 Jan 2016 01:10:34 +0000 (01:10 +0000)]
Refactor mml-smime.el, mml1991.el, mml2015.el

(Maybe this is the last merge from Gnus git to Emacs git)

Cf. discussion on ding mailing list, messages in
<http://thread.gmane.org/gmane.emacs.gnus.general/86228>.
Common code from the three files mml-smime.el, mml1991.el, and
mml2015.el is moved to mml-sec.el.  Auxiliary functions are added
to gnus-util.el.

The code is supported by test cases with necessary test keys.

Documentation in message.texi is updated.

* doc/misc/message.texi (Security, Using S/MIME):
Update for refactoring mml-smime.el, mml1991.el, mml2015.el.
(Using OpenPGP): Rename from "Using PGP/MIME"; update contents.
(Passphrase caching, Encrypt-to-self, Bcc Warning): New sections.

* lisp/gnus/gnus-util.el (gnus-test-list, gnus-subsetp, gnus-setdiff):
New functions.

* lisp/gnus/mml-sec.el: Require gnus-util and epg.
(epa--select-keys): Autoload.
(mml-signencrypt-style-alist, mml-secure-cache-passphrase): Doc fix.
(mml-secure-openpgp-signers): New user option;
make mml1991-signers and mml2015-signers obsolete aliases to it.
(mml-secure-smime-signers): New user option;
make mml-smime-signers an obsolete alias to it.
(mml-secure-openpgp-encrypt-to-self): New user option;
make mml1991-encrypt-to-self and mml2015-encrypt-to-self obsolete
aliases to it.
(mml-secure-smime-encrypt-to-self): New user option;
make mml-smime-encrypt-to-self an obsolete alias to it.
(mml-secure-openpgp-sign-with-sender): New user option;
make mml2015-sign-with-sender an obsolete alias to it.
(mml-secure-smime-sign-with-sender): New user option;
make mml-smime-sign-with-sender an obsolete alias to it.
(mml-secure-openpgp-always-trust): New user option;
make mml2015-always-trust an obsolete alias to it.
(mml-secure-fail-when-key-problem, mml-secure-key-preferences):
New user options.
(mml-secure-cust-usage-lookup, mml-secure-cust-fpr-lookup)
(mml-secure-cust-record-keys, mml-secure-cust-remove-keys)
(mml-secure-add-secret-key-id, mml-secure-clear-secret-key-id-list)
(mml-secure-cache-passphrase-p, mml-secure-cache-expiry-interval)
(mml-secure-passphrase-callback, mml-secure-check-user-id)
(mml-secure-secret-key-exists-p, mml-secure-check-sub-key)
(mml-secure-find-usable-keys, mml-secure-select-preferred-keys)
(mml-secure-fingerprint, mml-secure-filter-keys)
(mml-secure-normalize-cust-name, mml-secure-select-keys)
(mml-secure-select-keys-1, mml-secure-signer-names, mml-secure-signers)
(mml-secure-self-recipients, mml-secure-recipients)
(mml-secure-epg-encrypt, mml-secure-epg-sign): New functions.

* lisp/gnus/mml-smime.el: Require epg;
refactor declaration and autoloading of epg functions.
(mml-smime-use): Doc fix.
(mml-smime-cache-passphrase, mml-smime-passphrase-cache-expiry):
Obsolete.
(mml-smime-get-dns-cert, mml-smime-get-ldap-cert):
Use format instead of gnus-format-message.
(mml-smime-epg-secret-key-id-list): Remove variable.
(mml-smime-epg-passphrase-callback, mml-smime-epg-find-usable-key)
(mml-smime-epg-find-usable-secret-key): Remove functions.
(mml-smime-epg-sign, mml-smime-epg-encrypt): Refactor.

* lisp/gnus/mml1991.el (mml1991-cache-passphrase)
(mml1991-passphrase-cache-expiry): Obsolete.
(mml1991-epg-secret-key-id-list): Remove variable.
(mml1991-epg-passphrase-callback, mml1991-epg-find-usable-key)
(mml1991-epg-find-usable-secret-key): Remove functions.
(mml1991-epg-sign, mml1991-epg-encrypt): Refactor.

* lisp/gnus/mml2015.el (mml2015-cache-passphrase)
(mml2015-passphrase-cache-expiry): Obsolete.
(mml2015-epg-secret-key-id-list): Remove variable.
(mml2015-epg-passphrase-callback, mml2015-epg-check-user-id)
(mml2015-epg-check-sub-key, mml2015-epg-find-usable-key)
(mml2015-epg-find-usable-secret-key): Remove functions.
(mml2015-epg-decrypt, mml2015-epg-clear-decrypt, mml2015-epg-sign)
(mml2015-epg-encrypt): Refactor.

10 years agoMerge from gnulib
Paul Eggert [Fri, 1 Jan 2016 09:12:52 +0000 (01:12 -0800)]
Merge from gnulib

This mostly just updates copyright dates of gnulib files.
It also updates to the latest version of texinfo.tex.

10 years agoMove variables to inner loop, preparing for Mac port merge
YAMAMOTO Mitsuharu [Thu, 31 Dec 2015 02:28:16 +0000 (11:28 +0900)]
Move variables to inner loop, preparing for Mac port merge

* src/keyboard.c (command_loop_1): Move variables `cmd',
`keybuf', and `i' to inner loop.

10 years agoMinor improvements to (random t) documentation
Paul Eggert [Tue, 19 Jan 2016 05:31:09 +0000 (21:31 -0800)]
Minor improvements to (random t) documentation

* doc/lispref/numbers.texi (Random Numbers):
* src/fns.c (Frandom):
Omit unnecessary details about randomness fallback.
Say that it is a fallback.

10 years ago; Fix a typo
Dmitry Gutov [Tue, 19 Jan 2016 05:05:23 +0000 (08:05 +0300)]
; Fix a typo

10 years agoRename methods in Ruby etags example file
Dmitry Gutov [Tue, 19 Jan 2016 05:03:41 +0000 (08:03 +0300)]
Rename methods in Ruby etags example file

* test/etags/ruby-src/test.rb: Rename the example methods to
correspond to the common terminology used in Ruby.
* test/etags/CTAGS.good:
* test/etags/ETAGS.good_1:
* test/etags/ETAGS.good_2:
* test/etags/ETAGS.good_3:
* test/etags/ETAGS.good_4:
* test/etags/ETAGS.good_5:
* test/etags/ETAGS.good_6: Adjust accordingly.

10 years agoPropertize backtick in 'def `(abc)' as symbol constituent
Dmitry Gutov [Tue, 19 Jan 2016 04:58:46 +0000 (07:58 +0300)]
Propertize backtick in 'def `(abc)' as symbol constituent

* lisp/progmodes/ruby-mode.el (ruby-syntax-propertize):
Propertize backtick in 'def `(abc)' as symbol constituent.
(ruby-syntax-propertize-function):
Rename to ruby-syntax-propertize.

10 years agoFix scrolling under scroll-preserve-screen-position on TTY
Eli Zaretskii [Mon, 18 Jan 2016 19:53:34 +0000 (21:53 +0200)]
Fix scrolling under scroll-preserve-screen-position on TTY

* src/window.c (window_scroll_line_based): When setting point to
preserve screen coordinates, don't let cursor enter either of the
two scroll margins.  (Bug#22395)

10 years agoFix shr table rendering of nested tables
Lars Magne Ingebrigtsen [Mon, 18 Jan 2016 19:37:44 +0000 (20:37 +0100)]
Fix shr table rendering of nested tables

* shr.el (shr-table-body): Don't include all tbodies in nested
tables in the levels above.

10 years ago* lisp/progmodes/project.el (project--read-regexp): Quote the identifier.
Dmitry Gutov [Mon, 18 Jan 2016 19:12:44 +0000 (22:12 +0300)]
* lisp/progmodes/project.el (project--read-regexp): Quote the identifier.

10 years agoAdd xref-based replacements for Dired search commands
Dmitry Gutov [Mon, 18 Jan 2016 19:11:46 +0000 (22:11 +0300)]
Add xref-based replacements for Dired search commands

* lisp/dired-aux.el (dired-do-find-regexp)
(dired-do-find-regexp-and-replace): New commands.
http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00864.html

* lisp/dired.el (dired-mode-map): Change bindings for `A' and
`Q' to the new commands.

* lisp/progmodes/xref.el (xref-query-replace)
(xref-collect-matches): Add progress reporters.
(xref--find-ignores-arguments): Return nil for zero ignores.
(xref--show-xrefs): Add an optional argument.
(xref-collect-matches): Drop the assert.  'find' accepts a
regular file in place of directory argument, too.

10 years ago* doc/lispref/frames.texi (Position Parameters): Say they don't exist on TTYs.
Alan Mackenzie [Mon, 18 Jan 2016 18:51:45 +0000 (18:51 +0000)]
* doc/lispref/frames.texi (Position Parameters): Say they don't exist on TTYs.

10 years agoImprove user documentation of Xref
Eli Zaretskii [Mon, 18 Jan 2016 17:28:49 +0000 (19:28 +0200)]
Improve user documentation of Xref

* doc/emacs/maintaining.texi (Xref, Find Identifiers)
(Looking Up Identifiers, Identifier Search, List Identifiers):
Adjudicate comments by Dmitry Gutov <dgutov@yandex.ru>.  See
http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00650.html
for the details.

10 years agoFix scrolling under scroll-preserve-screen-position and margins
Eli Zaretskii [Mon, 18 Jan 2016 16:19:50 +0000 (18:19 +0200)]
Fix scrolling under scroll-preserve-screen-position and margins

* src/window.c (window_scroll_pixel_based): When setting point to
preserve screen coordinates, don't let cursor enter either of the
two scroll margins.  Fix incorrect usage of
WINDOW_WANTS_HEADER_LINE_P and use WINDOW_HEADER_LINE_HEIGHT
instead of CURRENT_HEADER_LINE_HEIGHT.  (Bug#22395)

10 years agoUnbreak the MS-Windows build
Eli Zaretskii [Mon, 18 Jan 2016 15:42:57 +0000 (17:42 +0200)]
Unbreak the MS-Windows build

* src/sysdep.c (emacs_gnutls_global_init, gnutls_rnd): Disable for
WINDOWSNT, to avoid link failure.  (Bug#22202)

10 years agoDesktop: protect users against inadvertant upgrading of desktop file.
Alan Mackenzie [Mon, 18 Jan 2016 13:32:22 +0000 (13:32 +0000)]
Desktop: protect users against inadvertant upgrading of desktop file.

An upgraded (version 208) desktop file cannot be read in Emacs < 25.

* etc/NEWS: Add an entry about upgrading a desktop file.

* lisp/desktop.el (desktop-file-version): Amend doc string.
(desktop-native-file-version, desktop-io-file-version): new variables.
(desktop-clear): Set desktop-io-file-version to nil.
(desktop-buffer-info): make the presence of the last item on the list
conditional on (>= desktop-io-file-version 208).
(desktop-save): Add extra parameter VERSION to take user's C-u or C-u C-u.
Amend the doc string.  Add code to determine the output file version.
(desktop-create-buffer): Set desktop-io-file-version to the input file's
version.

10 years agoInitialize GnuTLS before calling gnutls_rnd
Paul Eggert [Mon, 18 Jan 2016 01:16:12 +0000 (17:16 -0800)]
Initialize GnuTLS before calling gnutls_rnd

* src/gnutls.c (emacs_gnutls_global_init): Now extern.
Don’t set gnutls_global_initialized if gnutls_global_init fails.
* src/sysdep.c: Include "gnutls.h", and <gnutls/crypto.h>
if 2.12 or later, which has gnutls_rnd.
(emacs_gnutls_global_init, gnutls_rnd): New fallback
placeholder macros if before 2.12.
(init_random): Initialize gnutls globals before trying to
use gnutls_rnd.

10 years agoDon't use GnuTLS before it is initialized
Andreas Schwab [Sun, 17 Jan 2016 23:18:12 +0000 (00:18 +0100)]
Don't use GnuTLS before it is initialized

* src/sysdep.c (init_random): Don't use gnutls_rnd.

10 years ago* mh-e.el (mh-version): Add +git to version.
Bill Wohler [Sun, 17 Jan 2016 22:37:39 +0000 (14:37 -0800)]
* mh-e.el (mh-version): Add +git to version.

10 years agoPort cleanup attribute to OpenBSD
Paul Eggert [Sun, 17 Jan 2016 22:10:26 +0000 (14:10 -0800)]
Port cleanup attribute to OpenBSD

The OpenBSD C compiler issues false alarms about strcpy, strcat, and
sprintf, and this messes up 'configure' when it tests for the cleanup
attribute.  Work around the problem by using __has_attribute directly.
Problem reported by Joakim Jalap (Bug#22385).
* configure.ac: Don’t use AX_GCC_VAR_ATTRIBUTE.
* m4/ax_gcc_var_attribute.m4: Remove.
* src/conf_post.h (__has_attribute): Provide a substitute, for
non-GCC or older GCC compilers.  All uses changed to assume
the substitute.  Check for the cleanup attribute.
* src/emacs-module.c (module_has_cleanup): Just use __has_attribute.

10 years agoPrefer GnuTLS when acquiring random seed
Paul Eggert [Sun, 17 Jan 2016 20:12:08 +0000 (12:12 -0800)]
Prefer GnuTLS when acquiring random seed

This attempts to improve on the fix for Bug#22202.
* configure.ac (HAVE_DEV_URANDOM): Remove.
Check /dev/urandom existence at run time, not at build time,
since the device could exist in the former but not the latter.
* src/sysdep.c [HAVE_GNUTLS]: Include gnutls/gnutls.h.
(gnutls_rnd) [GNUTLS_VERSION_NUMBER < 0x020c00]: New fallback macro.
(random_seed): New typedef.
(set_random_seed): New static function.
(seed_random): Use them.
(init_random): Use random_seed instead of uintmax_t, so as to
not consume more entropy than needed.  Prefer gnutls_rnd if it
works; this avoids a redundant open of /dev/urandom on
GNU/Linux with modern GnuTLS.

10 years ago; Auto-commit of ChangeLog files.
Glenn Morris [Sun, 17 Jan 2016 11:23:45 +0000 (06:23 -0500)]
; Auto-commit of ChangeLog files.

10 years ago* lisp/emacs-lisp/syntax.el (syntax-ppss-table): New var
Stefan Monnier [Sat, 16 Jan 2016 20:06:04 +0000 (15:06 -0500)]
* lisp/emacs-lisp/syntax.el (syntax-ppss-table): New var

(syntax-ppss):
* lisp/font-lock.el (font-lock-fontify-syntactically-region): Use it.

10 years agolisp/nxml: Use syntax-tables for comments
Stefan Monnier [Sat, 16 Jan 2016 20:03:42 +0000 (15:03 -0500)]
lisp/nxml: Use syntax-tables for comments

* lisp/nxml/nxml-mode.el (nxml-set-face): Prepend.
(nxml-mode): Set syntax-ppss-table.
Use sgml-syntax-propertize-function for syntax-propertize-function.
Let font-lock highlight strings and comments.
(nxml-degrade): Don't touch "nxml-inside" property any more.
(nxml-after-change, nxml-after-change1): Remove functions.
(comment): Don't set fontify rule any more.
(nxml-fontify-attribute): Don't highlight the value any more.
(nxml-namespace-attribute-value-delimiter, nxml-namespace-attribute-value)
(nxml-comment-delimiter, nxml-comment-content): Remove faces.

* lisp/nxml/nxml-rap.el (nxml-scan-end): Remove.
(nxml-get-inside, nxml-inside-start, nxml-inside-end): Use syntax-ppss.
(nxml-clear-inside, nxml-set-inside): Remove.
(nxml-scan-after-change): Remove function.
(nxml-scan-prolog, nxml-tokenize-forward): Simplify.
(nxml-ensure-scan-up-to-date): Use syntax-propertize.
(nxml-move-outside-backwards):
* lisp/nxml/nxml-outln.el (nxml-section-tag-backward): Adjust to new
nxml-inside-start behavior.

* lisp/nxml/nxml-util.el (nxml-debug-set-inside)
(nxml-debug-clear-inside): Remove macros.

* lisp/nxml/xmltok.el (xmltok-forward-special): Remove function.
(xmltok-scan-after-comment-open): Simplify.

10 years ago* elisp-mode.el (elisp--font-lock-flush-elisp-buffers): Fix comment
Stefan Monnier [Sat, 16 Jan 2016 19:11:11 +0000 (14:11 -0500)]
* elisp-mode.el (elisp--font-lock-flush-elisp-buffers): Fix comment

10 years ago* lisp/nxml: Use standard completion; it also works for company-mode
Stefan Monnier [Sat, 16 Jan 2016 19:03:29 +0000 (14:03 -0500)]
* lisp/nxml: Use standard completion; it also works for company-mode

* lisp/nxml/nxml-mode.el (nxml-complete): Obsolete.
(nxml-completion-at-point-function): Remove.
(nxml-mode): Don't set completion-at-point-functions.
* lisp/nxml/rng-nxml.el (rng-nxml-mode-init): Set it here instead.
(rng-completion-at-point): Rename from rng-complete and mark it
non-interactive.  It is now to be used as completion-at-point-function.
(rng-complete-tag, rng-complete-end-tag, rng-complete-attribute-name)
(rng-complete-attribute-value): Don't perform completion, but return
completion data instead.
(rng-complete-qname-function, rng-generate-qname-list): Add a few
arguments, previously passed via dynamic coping.
(rng-strings-to-completion-table): Rename from
rng-strings-to-completion-alist.  Don't return an alist.  Don't both
sorting and uniquifying.

* lisp/nxml/rng-util.el (rng-complete-before-point): Delete function.
(rng-completion-exact-p, rng-quote-string): Delete functions.

* lisp/nxml/rng-valid.el (rng-recover-start-tag-open)
(rng-missing-attributes-message, rng-missing-element-message)
(rng-mark-missing-end-tags): Use explicit ".." in formats rather than
calling rng-quote-string everywhere.

10 years agoUse sgml-electric-tag-pair-mode also in nxml-mode
Stefan Monnier [Sat, 16 Jan 2016 15:43:19 +0000 (10:43 -0500)]
Use sgml-electric-tag-pair-mode also in nxml-mode

* lisp/nxml/rng-nxml.el: Require sgml-mode.
(rng-nxml-easy-menu): Add entry for sgml-electric-tag-pair-mode.
(rng-complete-qname-function): Use complete-with-action.

* lisp/textmodes/sgml-mode.el (sgml-electric-tag-pair-before-change-function):
Let-bind forward-sexp-function, since nxml-mode binds it to
something incompatible.

* lisp/nxml/nxml-mode.el: Use setq-local and defvar-local.

10 years ago; * etc/NEWS: The final touch.
Eli Zaretskii [Sat, 16 Jan 2016 15:36:21 +0000 (17:36 +0200)]
; * etc/NEWS: The final touch.